package com.selfdiscipline.data.model

import java.util.Date
import java.util.UUID

/**
 * Entity for tracking time spent on tasks
 */
data class TimeRecord(
    val id: String = UUID.randomUUID().toString(),
    val taskId: String? = null,
    val startTime: Date,
    val endTime: Date? = null,
    val duration: Long = 0, // Duration in milliseconds
    val category: TimeCategory = TimeCategory.FOCUS,
    val notes: String? = null,
    val isCompleted: Boolean = false
)

/**
 * Categories for time tracking
 */
enum class TimeCategory {
    FOCUS,
    BREAK,
    LEISURE,
    WORK,
    STUDY,
    EXERCISE,
    OTHER
}

/**
 * Daily time summary
 */
data class DailyTimeSummary(
    val date: Date,
    val totalFocusTime: Long,
    val totalBreakTime: Long,
    val sessionsCompleted: Int,
    val productivityScore: Float
)

/**
 * Time record with related task information
 */
data class TimeRecordWithTask(
    val timeRecord: TimeRecord,
    val task: Task?
) 